<template>
	<view :style="themeColor">
		<view class="page">
			<view class="flex flex-direction flex-wrap align-stretch justify-center benben-position-layout flex logOutRisk_flex_0" :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
				<view class='flex flex-wrap align-stretch justify-between logOutRisk_fd0_0'>
					<view class='flex flex-wrap align-center logOutRisk_fd0_0_c0' @tap.stop="handleJumpDiy"
						data-type="back" data-url="1">
						<text class='fu-iconfont2  logOutRisk_fd0_0_c0_c0'>&#xe794;</text>
					</view>
					<view class='flex flex-wrap align-center'>
						<text class='logOutRisk_fd0_0_c1_c0'>注销账号</text>
					</view>
					<view class='flex align-center justify-end logOutRisk_fd0_0_c2'>
					</view>
				</view>
			</view>
			<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
			<view class="loading_css" v-if="isShow">
				<u-loading size="36" color="#F35D2A"></u-loading>
				<view>加载中</view>
			</view>

			<!---注销账号风险-提示flex布局开始-->
			<view class="flex flex-direction flex-wrap align-stretch logOutRisk_flex_1" v-else>
				<view class='flex flex-wrap align-center logOutRisk_fd1_0'>
					<text class='logOutRisk_fd1_0_c0'>账号注销</text>
				</view>
				<text class='logOutRisk_fd1_1'>永久注销且无法恢复，请谨慎操作</text>
				<text class='logOutRisk_fd1_2'>账号注销后将放弃以下权益：</text>
				<u-parse class='logOutRisk_fd1_3' :html="content">
				</u-parse>
				<view class='logOutRisk_fd1_4_c0'>点击下方按钮，即表示你已阅读并了解以上风险</view>
				<view class='flex flex-direction align-center logOutRisk_fd1_4'>
					
					<button
						class='logOutRisk_fd1_4_c1' @tap.stop="popupShow1698226156059=true">我已清楚风险，确定继续</button>
					<button
						class='logOutRisk_fd1_4_c2' @tap.stop="handleJumpDiy" data-type="back" data-url="1">返回</button>
				</view>
			</view>
			<view style="height: 230rpx;"></view>

			<benben-popup v-model="popupShow1698226156059" :mask="true" :mask-close-able="true" mode='center'>
				<!---退出登录flex布局开始-->
				<view class="flex flex-direction flex-wrap align-center system_flex_2">
					<!-- <text class='system_fd2_0'>提示</text> -->
					<view class='system_fd2_1'>请再次确认，你已了解注销风险，并要继续执行该操作</view>
					<view class='flex align-center system_fd2_2'>
						<button class='system_fd2_2_c0' @tap.stop="popupShow1698226156059=false">取消</button>
						<button class='system_fd2_2_c1' @tap.stop="submitZhuxiao()">确定</button>
					</view>
				</view>
			</benben-popup>

		</view>
	</view>
</template>
<script>
	import {
		validate
	} from '@/common/utils/validate.js'
	export default {
		components: {},


		data() {
			return {
				"popupShow1698226156059": false,
				"dataMessage": {
					"aid": "",
					"name": "",
					"thumb_img": "",
					"content": "",
					"introduce": ""
				},
				"cancel_type": "1",
				"cancel_reason": "不想使用了",
				"content": "",
				"isShow": true,
			};
		},
		computed: {
			themeColor() {
				return this.$store.getters.themeColor
			},

		},
		watch: {},
		onLoad(options) {
			let {
				cancel_type,
				cancel_reason
			} = options
			if (cancel_type !== undefined) this.cancel_type = cancel_type
			if (cancel_reason !== undefined) this.cancel_reason = cancel_reason
			this.getZhuxiao();
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {

		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {

		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			// 注销账号文案  63a6ac771882e
			getZhuxiao() {
				this.$api.post(global.API_VERSION + '63a6ac771882e', {
					aid: 4
				}).then(res => {
					this.isShow = false;
					if (res.data.code == 1) {
						this.content = res.data.data.content;
					} else {
						this.$message.info(res.data.msg);
					}
				})
			},

			submitZhuxiao() {
				this.popupShow1698226156059 = false;
				this.$api.post(global.API_VERSION + '60fa21d76a8f1', {
					type_id: this.cancel_type,
					reason: this.cancel_reason
				}).then(res => {
					this.$message.info(res.data.msg);
					if (res.data.code == 1) {
						setTimeout(() => {
							this.$store.commit('logout')
							this.$urouter.reLaunch(`/pages/tabBar/passwordLogin/passwordLogin`);
						}, 800)
					}
				})
			},
		}
	};
</script>
<style lang="scss" scoped>
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background-size: 100% auto;
	}

	.logOutRisk_flex_0 {
		border-bottom: 1px solid #eee;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-color: #fff;
		background-size: 100% auto !important;
	}

	.logOutRisk_fd0_0_c2 {
		padding: 0rpx 0rpx 0rpx 0rpx;
		width: 100rpx;
	}

	.logOutRisk_fd0_0_c1_c0 {
		font-size: 36rpx;
		font-weight: 500;
		color: #333;
	}

	.logOutRisk_fd0_0_c0_c0 {
		font-size: 36rpx;
		font-weight: 400;
		color: #333;
	}

	.logOutRisk_fd0_0_c0 {
		width: 100rpx;
	}

	.logOutRisk_fd0_0 {
		padding: 0rpx 32rpx 0rpx 32rpx;
		line-height: 88rpx;
		background: #FFFFFF;
	}

	.logOutRisk_flex_1 {
		font-size: 32rpx;
		background-size: 100% auto !important;
		padding: 32rpx 24rpx 32rpx 24rpx;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
	}

	.logOutRisk_fd1_4_c2 {
		background: #F6F6F6;
		border-radius: 50rpx 50rpx 50rpx 50rpx;
		font-size: 32rpx;
		color: #333;
		width: 686rpx;
		height: 80rpx;
		line-height: 80rpx;
		font-weight: 400;
		margin: 32rpx 0rpx 0rpx 0rpx;
	}

	.logOutRisk_fd1_4_c1 {
		background: #F45656;
		border-radius: 44rpx 44rpx 44rpx 44rpx;
		font-size: 32rpx;
		color: var(--benbenFontColor3);
		width: 686rpx;
		height: 80rpx;
		line-height: 80rpx;
		font-weight: 400;
	}

	.logOutRisk_fd1_4_c0 {
		// border-top: 1px solid #eee;
		// background: #fff;
		font-size: 24rpx;
		font-weight: 400;
		color: #F35D2A;
		margin: 40rpx 0rpx 0rpx 0rpx;
	}

	.logOutRisk_fd1_4 {
		position: fixed;
		left: 0rpx;
		bottom: calc(0rpx + var(--window-bottom));
		padding: 0 0 40rpx 32rpx;
		background: #FFFFFF;
	}

	::v-deep .logOutRisk_fd1_3 {
		width: 100%;
	}

	.logOutRisk_fd1_2 {
		font-size: 28rpx;
		font-weight: 600;
		color: var(--benbenFontColor0);
		padding: 48rpx 0rpx 24rpx 0rpx;
	}

	.logOutRisk_fd1_1 {
		line-height: 40rpx;
		font-size: 28rpx;
		font-weight: 500;
		color: var(--benbenFontColor0);
	}

	.logOutRisk_fd1_0_c0 {
		font-size: 28rpx;
		font-weight: 600;
		color: var(--benbenFontColor0);
	}

	.logOutRisk_fd1_0 {
		margin: 0rpx 0rpx 24rpx 0rpx;
	}

	.logOutRisk_fd2_0_c0_c2_c1_c0 {
		color: #FFFFFF;
		font-size: 34rpx;
		font-weight: 400;
	}

	.logOutRisk_fd2_0_c0_c2_c1 {
		background: url(https://www.guochaoxiaoju.com/uploads/mini/694.png) no-repeat;
		height: 71rpx;
		width: 191rpx;
		margin: 0rpx 0rpx 0rpx 16rpx;
		background-size: 100% auto;
	}

	.logOutRisk_fd2_0_c0_c2_c0_c0 {
		color: #796446;
		font-size: 34rpx;
		font-weight: 400;
	}

	.logOutRisk_fd2_0_c0_c2_c0 {
		background: url(https://www.guochaoxiaoju.com/uploads/mini/693.png) no-repeat;
		height: 71rpx;
		width: 191rpx;
		margin: 0rpx 16rpx 0rpx 0rpx;
		background-size: 100% auto;
	}

	.logOutRisk_fd2_0_c0_c2 {
		margin: 0rpx 0rpx 70rpx 0rpx;
	}

	.logOutRisk_fd2_0_c0_c1 {
		line-height: 44rpx;
		font-size: 32rpx;
		font-weight: 400;
		color: #333333;
		margin: 40rpx 0rpx 35rpx 0rpx;
		text-align: center;
	}

	.logOutRisk_fd2_0_c0_c0 {
		color: #333333;
		font-size: 40rpx;
		font-weight: 400;
		margin: 190rpx 0rpx 0rpx 0rpx;
	}

	.logOutRisk_fd2_0 {
		background: url(https://www.guochaoxiaoju.com/uploads/mini/692.png) no-repeat;
		width: 580rpx;
		background-size: 100% auto;
	}
	.system_flex_2 {
		background: #fff;
		width: 540rpx;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
	}
	
	.system_fd2_2_c1 {
		border-top: 1px solid #eee;
		border-left: 1px solid #eee;
		background: #fff;
		line-height: 100rpx;
		border-radius: 0rpx 0rpx 16rpx 0rpx;
		font-size: 32rpx;
		color: #F35D2A;
		width: 268rpx;
	}
	
	.system_fd2_2_c0 {
		border-top: 1px solid #eee;
		background: #fff;
		line-height: 100rpx;
		border-radius: 0rpx 0rpx 0rpx 16rpx;
		font-size: 32rpx;
		color: rgba(153, 153, 153, 1);
		width: 268rpx;
	}
	
	.system_fd2_2 {
		margin: 37rpx 0rpx 0rpx 0rpx;
	}
	
	.system_fd2_1 {
		line-height: 44rpx;
		font-size: 32rpx;
		font-weight: 500;
		color: #333333;
		padding: 64rpx 45rpx 32rpx;
		text-align: center;
	}
	
	.system_fd2_0 {
		font-size: 36rpx;
		font-weight: 800;
		line-height: 44rpx;
		color: #333333;
		margin: 40rpx 0rpx 40rpx 0rpx;
	}
</style>